<?php
   # first get a mysql connection as per the FAQ

  $fcontents = file ('timecard.csv'); 
  # expects the csv file to be in the same dir as this script

  for($i=0; $i<sizeof($fcontents); $i++) { 
      $line = trim($fcontents[$i]); 
      $arr = explode(",", $line); 
      #if your data is comma separated
      # instead of tab separated, 
      # change the '\t' above to ',' 
     
      $sql = "INSERT INTO test.timecard VALUES (". 
                  implode(",", $arr) .")"; 
      //mysql_query($sql);
      echo $sql ." \n";
      
}
?>